<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.ahp.bean.*" %>
<%@ page import="java.util.*" %>
<%@ include file="../include/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="<%=path %>/js/jquery-1.3.2.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="<%=path%>/style/style_manage.css" type="text/css"></link>
<title>添加新模板</title>
<style type="text/css">
.added{border: 1px solid gray; margin: 1em 1em; padding: 5px 8px;}
.delSpan{cursor: pointer;}
div{line-height: 150%;}
</style>
<script type="text/javascript">
	function remove(facID){
	if(confirm('你确定要删除吗？')){
		$.post("<%=path%>/factor/removeFactor.action",{
		 	id:facID,
			d:new Date().getMilliseconds()
		},function(data){
		 if(data == "suc"){
			$("#line"+facID).hide();
			alert("删除成功！");		
			 }
		});
		}
}
</script>
</head>
<%
List<Factor> faclist = (List)request.getAttribute("list");
%>
<body>
<div id="management">
<div style="font-size: 20px;font-weight: bold;text-align: center;">模板<%=request.getAttribute("factor")%>中一级因子</div>
	<div id="newFactor"></div>
	<br/>
		<table class="table">
			<tr>
				<td align="right">因子名称</td>
				<td>操作</td>
			</tr>
			<%for(int a = 0;a<faclist.size();a++){ %>
			<tr id="line<%=faclist.get(a).getFacId() %>">
				<td align="right" width="45%"><%=faclist.get(a).getName() %></td>
				<td><a href="javascript:remove('<%=faclist.get(a).getFacId() %>')">删除</a></td>
			</tr>
			<%} %>
		</table>
</div>
</body>
</html>